define(function(){
    return function(res, cont){
        let str = "";
        for(var i=0;i<res.length;i++){
            str += `<div class="box" id="${res[i].proId}">
                        <a href="./detail.html?id=${res[i].proId}">
                            <img src="${res[i].img}" alt="">
                            <p>${res[i].proName}</p>
                            <i>￥</i>
                            <span>${res[i].price}</span>
                        </a>
                        <input type="button" value="加入购物车" class="add">
                    </div>`
        }
        cont.html(str);
    }
})